<? 
	include('base.php');
	User::protect();
	$section = 'band_gps';
	include_class('band_gps');
	$page_title = 'View/Edit Guest Performers';
	include('layout/header.php');
?>

<div id="breadcrumb">
	<a href="index.php">Audition&nbsp;&#62;</a>&nbsp;<a href="band.php">Manage&nbsp;Band&nbsp;&#62;</a>&nbsp;Guest Performers
</div>

	<h1>guest performers:</h1>
	<div class="inset">
	<p>
	<?
		$gpl = new BandGuestPerformersList;
		$gpArray = $gpl->get_guest_performers($_GET['entries_per_page'], $_GET['start']);
		$news_total = $gpl->get_total();
	?>
	<form id="amount_form" action="<?=$PHP_SELF?>" method="get">
		<? if (User::isAdmin()) { ?><a href="band_gp_add.php">Add Guest Performer</a><span class="padded">|</span><? } ?>
		<? include('layout/paging.php'); ?>
	</form>
	</p>
	<p>
	<table class="list" border="0" cellspacing="1" cellpadding="0">
	<tr>
		<td class="header">Name</td>
		<td class="header">Function</td>
	</tr>
	<?
		if (is_array($gpArray) && count($gpArray) > 0) { 
		foreach ($gpArray as $gp) { ?>
		<tr>
			<td valign="top"><a href="band_gp_edit.php?id=<?=$gp->getID()?>"><?=$gp->getFirstName()?>&nbsp;<?=$gp->getLastName()?></a> <? if (!$gp->isActive()) { ?><img src="images/inactive.gif" alt="Entry is Inactive" width="10" height="10" title="Entry is Inactive"><? } ?></td>
			<td valign="top" width="60%"><?=$gp->getFunction()?></td>
		</tr>				
		<? }
	} else {?>
		<tr>
			<td colspan="2">There are no guest performers.</td>
		</tr>
	<? } ?>
	</table>
	</p>		
	</div>